import request from "@/utils/request";

// 获取左侧专业数据
export function getTree(data) {
  return request({
    method: "post",
    url: "/requirement/getMajor",
    data,
  });
}

// 获取表格数据
export function getTable(data) {
  return request({
    method: "post",
    url: "/excel/getRequirementList",
    data,
  });
}

// 确认新增
export function verifyAdd(data) {
  return request({
    method: "post",
    url: "/requirement/add",
    data,
  });
}

// 编辑回显数据
export function edit(id) {
  return request({
    method: "get",
    url: "/requirement/getRequirementOne/" + id,
  });
}

// 编辑确认按钮
export function verifyEdit(data) {
  return request({
    method: "post",
    url: "/requirement/update",
    data,
  });
}

// 删除表格数据
export function deleteTable(id) {
  return request({
    url: "/requirement/" + id,
    method: "delete",
  });
}

// 批量删除表格数据
export function deleteTableAll(ids) {
  return request({
    url: "/requirement/job/" + ids,
    method: "delete",
  });
}
